/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.ems.entity;

import java.util.Date;

import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 订单Entity
 * @author zad
 * @version 2018-01-25
 */
public class EmsOrder extends DataEntity<EmsOrder> {
	
	private static final long serialVersionUID = 1L;
	private String orderNo;		// 订单编号
	private String name;		// 订单名称
	private int refundCount;	// 退单个数，用于判断订单是否已经退单
	private String type;		// 是否后台订单
	private String orderFrom;    // 订单来源
	private Integer personNum;		// 报名人数
	private Integer personTime;		// 报名人次
	private Double sumMoney;		// 实际金额
	private Double payMoney;		// 应付金额
	private String payType;		// 支付方式
	private String discountType;		// 优惠方式
	// private Date createTime;		// 创建时间
	private Date successDate;		// 接口返回时间
	private String status;		// 状态
	
	public EmsOrder() {
		super();
	}

	public EmsOrder(String id){
		super(id);
	}

	@Length(min=1, max=64, message="订单编号长度必须介于 1 和 64 之间")
	public String getOrderNo() {
		return orderNo;
	}

	public void setOrderNo(String orderNo) {
		this.orderNo = orderNo;
	}
	
	@Length(min=0, max=32, message="订单名称长度必须介于 0 和 32 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Length(min=1, max=2, message="是否前台订单长度必须介于 1 和 2 之间")
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	public Integer getPersonNum() {
		return personNum;
	}

	public void setPersonNum(Integer personNum) {
		this.personNum = personNum;
	}

	public Integer getPersonTime() {
		return personTime;
	}

	public void setPersonTime(Integer personTime) {
		this.personTime = personTime;
	}

	public String getPayType() {
		return payType;
	}

	public void setPayType(String payType) {
		this.payType = payType;
	}

	public String getDiscountType() {
		return discountType;
	}

	public void setDiscountType(String discountType) {
		this.discountType = discountType;
	}

	@NotNull(message="实际金额不能为空")
	public Double getSumMoney() {
		return sumMoney;
	}

	public void setSumMoney(Double sumMoney) {
		this.sumMoney = sumMoney;
	}
	
	@NotNull(message="应付金额不能为空")
	public Double getPayMoney() {
		return payMoney;
	}

	public void setPayMoney(Double payMoney) {
		this.payMoney = payMoney;
	}
	
	@Length(min=1, max=2, message="状态长度必须介于 1 和 2 之间")
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public Date getSuccessDate() {
		return successDate;
	}

	public void setSuccessDate(Date successDate) {
		this.successDate = successDate;
	}

	public String getOrderFrom() {
		return orderFrom;
	}

	public void setOrderFrom(String orderFrom) {
		this.orderFrom = orderFrom;
	}

	public int getRefundCount() {
		return refundCount;
	}

	public void setRefundCount(int refundCount) {
		this.refundCount = refundCount;
	}
	
}